import random
from collections import Counter

# 生成100个0到9的随机整数
random_numbers = [random.randint(0, 9) for _ in range(100)]

# 计算平均值
average = sum(random_numbers) / len(random_numbers)

# 统计每个数字出现的次数
counts = Counter(random_numbers)

# 打印结果
print(f"生成的随机整数: {random_numbers}")
print(f"平均值: {average}")
print(f"每个数字出现的次数: {dict(counts)}")